package club.sanmubird.travel_culture_wx_demo.demo.mongodb.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;

/**
 * @program: springboot-simpleMongDb
 * @description: student
 * @author: sam
 * @create: 2018-07-18 22:38
 * @update: 2018-07-18 22:38
 * @update: Sam
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
//@EqualsAndHashCode(callSuper = true)
@Entity(value = "student", noClassnameStored = true)
public class Student {

	@Id
	protected String id;
	private String name;
	private Integer age;
	private String gender;
	private String hobby;

	public Student(String name, Integer age, String gender, String hobby){
		this.name = name;
		this.age = age;
		this.gender = gender;
		this.hobby = hobby;
	}
}
